package ru.amse.ilyin.gui;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

import ru.amse.ilyin.gui.actions.TestAction;

class MenuFactory {
	/**
	 * Creates an application menu.
	 * 
	 * @return menu
	 */
	public static JMenuBar createMenu() {
		final JMenuBar result = new JMenuBar();
		
		final MenuFactory factory = new MenuFactory();
		result.add(factory.createFileMenu());
		
		return result;
	}
	
	private MenuFactory() {
	}
	
	private JMenu createFileMenu() {
		final JMenu result = new JMenu("File");
		
		result.add(new JMenuItem(new TestAction()));
		result.add(new JMenuItem(new TestAction()));
		
		return result;
	}
}
